trait Core {
  type TBase <: Base
  
  trait Base requires TBase {
    type s <: TBase 
    
    def foo() :s 
  }    
}

trait Extension extends Core {
	type TExtended <: TBase with ExtendedBase 
	
	def Extended() :TExtended
	trait ExtendedBase requires TExtended extends Base {
		type s = TExtended
		
		def foo() :s = Extended()
	}
}

/*
~/Downloads/scala-2.1.4.7354/bin/scalac -d /tmp/ outermember.scala 
exception when transforming Extension.this.Extended
exception when transforming Extension.this.Extended()
exception when transforming def foo(): Extension.this.TExtended = Extension.this.Extended()
exception when transforming java.lang.Object with Extension.this.Base with scala.ScalaObject {
  type s = Extension.this.TExtended;
  def foo(): Extension.this.TExtended = Extension.this.Extended();
  private <local> <paramaccessor> val Extension$ExtendedBase$$$outer : Extension.this.type = _;
  <stable> <accessor> <paramaccessor> def Extension$ExtendedBase$$$outer(): Extension.this.type = ExtendedBase.this.Extension$ExtendedBase$$$outer ;
  def /*ExtendedBase*/$init$(): scala.Unit = ()
}
exception when transforming abstract trait ExtendedBaserequires Extension.this.TExtended extends java.lang.Object with Extension.this.Base with scala.ScalaObject {
  type s = Extension.this.TExtended;
  def foo(): Extension.this.TExtended = Extension.this.Extended()
}
exception when transforming java.lang.Object with Core with scala.ScalaObject {
  type TExtended >: scala.All <: Extension.this.TBase with Extension.this.ExtendedBase;
  def Extended(): Extension.this.TExtended;
  abstract trait ExtendedBaserequires Extension.this.TExtended extends java.lang.Object with Extension.this.Base with scala.ScalaObject {
    type s = Extension.this.TExtended;
    def foo(): Extension.this.TExtended = Extension.this.Extended()
  };
  def /*Extension*/$init$(): scala.Unit = ()
}
exception when transforming abstract trait Extension extends java.lang.Object with Core with scala.ScalaObject {
  type TExtended >: scala.All <: Extension.this.TBase with Extension.this.ExtendedBase;
  def Extended(): Extension.this.TExtended;
  abstract trait ExtendedBaserequires Extension.this.TExtended extends java.lang.Object with Extension.this.Base with scala.ScalaObject {
    type s = Extension.this.TExtended;
    def foo(): Extension.this.TExtended = Extension.this.Extended()
  }
}
exception when transforming package <empty> {
  abstract trait Core extends java.lang.Object with scala.ScalaObject {
    type TBase >: scala.All <: Core.this.Base;
    abstract trait Baserequires Core.this.TBase extends java.lang.Object with scala.ScalaObject {
      type s >: scala.All <: Core.this.TBase;
      def foo(): Base.this.s
    }
  };
  abstract trait Extension extends java.lang.Object with Core with scala.ScalaObject {
    type TExtended >: scala.All <: Extension.this.TBase with Extension.this.ExtendedBase;
    def Extended(): Extension.this.TExtended;
    abstract trait ExtendedBaserequires Extension.this.TExtended extends java.lang.Object with Extension.this.Base with scala.ScalaObject {
      type s = Extension.this.TExtended;
      def foo(): Extension.this.TExtended = Extension.this.Extended()
    }
  }
}
Exception in thread "main" java.lang.Error: assertion failed: ExtendedBase.this.type
        at scala.Predef$.assert(Predef.scala:175)
        at scala.tools.nsc.transform.ExplicitOuter.scala$tools$nsc$transform$ExplicitOuter$$outerMember(ExplicitOuter.scala:80)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.outerSelect(ExplicitOuter.scala:114)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.outerValue(ExplicitOuter.scala:100)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:289)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1004)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:132)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:311)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:998)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:132)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:311)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$16.apply(Trees.scala:943)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$16.apply(Trees.scala:942)
        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1044)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:941)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:132)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:311)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$25.apply(Trees.scala:1038)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$25.apply(Trees.scala:1036)
        at scala.List$.loop$0(List.scala:232)
        at scala.List$.mapConserve(List.scala:249)
        at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1036)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:962)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:132)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:311)
        at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1024)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$13.apply(Trees.scala:930)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$13.apply(Trees.scala:930)
        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1044)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:929)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:132)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:311)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$25.apply(Trees.scala:1038)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$25.apply(Trees.scala:1036)
        at scala.List$.loop$0(List.scala:232)
        at scala.List$.mapConserve(List.scala:249)
        at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1036)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:962)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:132)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:311)
        at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1024)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$13.apply(Trees.scala:930)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$13.apply(Trees.scala:930)
        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1044)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:929)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:132)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:311)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$25.apply(Trees.scala:1038)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$25.apply(Trees.scala:1036)
        at scala.List$.loop$0(List.scala:232)
        at scala.List$.mapConserve(List.scala:249)
        at scala.List$.loop$0(List.scala:236)
        at scala.List$.mapConserve(List.scala:249)
        at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1036)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$12.apply(Trees.scala:926)
        at scala.tools.nsc.ast.Trees$Transformer$$anonfun$12.apply(Trees.scala:926)
        at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1044)
        at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:925)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:132)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anon$0.transform(ExplicitOuter.scala:311)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$7.apply(ExplicitOuter.scala:357)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$7.apply(ExplicitOuter.scala:357)
        at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:41)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:356)
        at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1039)
        at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:22)
        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:214)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:203)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$1.apply(Global.scala:203)
        at scala.Iterator$class.foreach(Iterator.scala:304)
        at scala.collection.mutable.ListBuffer$$anon$0.foreach(ListBuffer.scala:216)
        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:203)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:445)
        at scala.tools.nsc.Global$Run.compile(Global.scala:503)
        at scala.tools.nsc.Main$.process(Main.scala:60)
        at scala.tools.nsc.Main$.main(Main.scala:82)
        at scala.tools.nsc.Main.main(Main.scala)
*/




















